package com.zp.qualitypractice.Bean;

import java.io.Serializable;

/**
 * Created by izp on 2017/4/14.
 * 有泛型貌似不能使用Parcelable
 */

public class BeanResponse<T> implements Serializable {
    private int resultCode;
    private T returnObject;
    private Object ruturnInfo;

    public int getResultCode() {
        return resultCode;
    }

    public BeanResponse setResultCode(int resultCode) {
        this.resultCode = resultCode;
        return this;
    }

    public T getReturnObject() {
        return returnObject;
    }

    public BeanResponse setReturnObject(T returnObject) {
        this.returnObject = returnObject;
        return this;
    }

    public Object getRuturnInfo() {
        return ruturnInfo;
    }

    public BeanResponse setRuturnInfo(Object ruturnInfo) {
        this.ruturnInfo = ruturnInfo;
        return this;
    }

//    @Override
//    public int describeContents() {
//        return 0;
//    }

//    @Override
//    public void writeToParcel(Parcel dest, int flags) {
//        dest.writeInt(this.resultCode);
//        dest.writeParcelable(this.returnObject, flags);
//        dest.writeParcelable(this.ruturnInfo, flags);
//    }
//
//    public BeanResponse() {
//    }
//
//    protected BeanResponse(Parcel in) {
//        this.resultCode = in.readInt();
//        this.returnObject = in.readParcelable(T.class.getClassLoader());
//        this.ruturnInfo = in.readParcelable(Object.class.getClassLoader());
//    }
//
//    public static final Parcelable.Creator<BeanResponse> CREATOR = new Parcelable.Creator<BeanResponse>() {
//        @Override
//        public BeanResponse createFromParcel(Parcel source) {
//            return new BeanResponse(source);
//        }
//
//        @Override
//        public BeanResponse[] newArray(int size) {
//            return new BeanResponse[size];
//        }
//    };
}
